//
//  UIView+Frame.m
//  01-UIView、UIWindow
//
//  Created by 徐康 on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
- (void)setKx_x:(CGFloat)kx_x{
    CGRect rect = self.frame;
    rect.origin.x = kx_x;
    self.frame = rect;
}
- (CGFloat)kx_x{
    return self.frame.origin.x;
}
- (void)setKx_y:(CGFloat)kx_y{
    CGRect rect = self.frame;
    rect.origin.y = kx_y;
    self.frame = rect;
}
- (CGFloat)kx_y{
    return self.frame.origin.y;
}
- (void)setKx_width:(CGFloat)kx_width{
    CGRect rect = self.frame;
    rect.size.width = kx_width;
    self.frame = rect;
}
- (CGFloat)kx_width{
    return self.frame.size.width;
}
- (void)setKx_height:(CGFloat)kx_height{
    CGRect rect = self.frame;
    rect.size.height = kx_height;
    self.frame = rect;
}
- (CGFloat)kx_height{
    return self.frame.size.height;
}
- (void)setKx_centerX:(CGFloat)kx_centerX{
    CGPoint center = self.center;
    center.x = kx_centerX;
    self.center = center;
}
- (CGFloat)kx_centerX{
    return self.center.x;
}
- (void)setKx_centerY:(CGFloat)kx_centerY{
    CGPoint center = self.center;
    center.y = kx_centerY;
    self.center = center;
}
- (CGFloat)kx_centerY{
    return self.center.y;
}
@end
